avd_name = sys.argv[2]
result_file = sys.argv[3].replace('\\','/')

def write_result(result_file, step, result):
    fd=open(result_file, "a")
    fd.write(step + ";" + result + "\n")
    fd.close()

switchApp('5554:' + avd_name)
click("1360769404031.png")
click("DBANDje.png")
sleep(15)
if exists("SystemCreaUs.png"):
    print result_file + "  OK"
    write_result(result_file, "app_start", "OK")
else:
    print result_file + "  FAILED"
    write_result(result_file, "app_start", "FAILED")

 
#fd=open(result_file, "a")
#fd.write("app_start;OK\n")
#fd.close()